fix: no-std compatibility tweak (#1) #146
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Current
sp-core
crate (version7.0.0
) with featurefull_crypto
depends onlibsecp256k1
crate withversion = "0.7", default-features = false, features = ["static-context"]
.full_crypto
is a feature intended forno_std
support andlibsecp256k1
withdefault-features = false
is supposed to work withno_std
. However,libsecp256k1
withdefault-features = false
currently does not compile at least on targetsthumbv7m-none-eabi
andthumbv7em-none-eabi
causingsp-core
infull_crypto
to not compile as well.Possible fix
[build-dependencies]
containlibsecp256k1-gen-ecmult
andlibsecp256k1-gen-genmult
, both depending onlibsecp256k1-core
with default features (i.e. instd
mode).If the
Cargo.toml
files for bothlibsecp256k1-gen-ecmult
andlibsecp256k1-gen-genmult
are changed to havelibsecp256k1-core
withdefault-features = false
, things keep building as before instd
and begin to build inno-std
as well.Also, a few dependencies (
serde
andbase64
) get used only instd
, but were not marked asoptional = true
, although this does not affect buildability.We will maintain a thus fixed version of the crate for Kampela development and switch to this upstream if the issue gets resolved.